using System;
using System.Collections.Generic;
using System.Text;

namespace ElteIk.RoboSoccer.Communication
{
	public class SocketWrapper<T>
	{
		public virtual void Send(T data)
		{
		}

		protected void ListenerThreadMain()
		{
		}

		protected void ReceiverThreadMain()
		{
		}

		#region Events

		public class DataReceivedEventArgs : EventArgs
		{
			private T data;
			public T ReceivedData
			{
				get { return data; }
			}

			public DataReceivedEventArgs(T data)
			{
				this.data = data;
			}
		}

		public event EventHandler<DataReceivedEventArgs> DataReceived;

		protected void OnDataReceived(T data)
		{
			if (DataReceived != null)
				DataReceived(this, new DataReceivedEventArgs(data));
		}

		#endregion

	}
}
